<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$ngay=array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15',
'16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31');
$thang=array('01','02','03','04','05','06','07','08','09','10','11','12');
$nam=array(
           '2000','2001','2002','2003','2004','2005','2006','2007','2008','2009',
           '2010','2011','2012','2013','2014','2015','2016','2017','2018','2019');
$lancapvisa=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
?>
<form action="<?php echo base_url()?>staff/updatePassVi" name="formAddPassVi" method="POST" onsubmit="return checkPassVi();">
<table class="tablebg" cellspacing="1" align="right" width="900px" border="0">
    <tr>
        <td colspan="4" class="bar">Extend Visa for: <strong><?=$FullName?></strong></td>
    </tr>
    <tr>
        <td><input type="hidden" name="txtIDNumber" value="<?=$ID_Number?>"></td>
    </tr>
    <tr>
        <td class="row10">
            Type
        </td>
        <td class="row12">
            <input type="text" name="txtType" class="form" value="<?php if(isset($Type)) echo $Type?>">
        </td>
    </tr>
     <tr>
        <td class="row10">
            Nationality
        </td>
        <td class="row12">
            <input type="text" name="txtNationality" class="form" value="<?php if(isset($Nationality)) echo $Nationality?>">
        </td>
    </tr>
    <tr>
        <td class="row10">
            Visa Number
        </td>
        <td class="row12">
            <select name="txtNumberVisa">
                <?php
                                   foreach($lancapvisa as $item){
                                     if($item == $NumberVisa)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="row10" align="left">
            Visa Date Start
        </td>
        <td class="row12" align="left">
            <select name="txtVisaDayStart">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $VisaDayStart)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaMonthStart">
                <?php
                                   foreach($thang as $item){
                                     if($item == $VisaMonthStart)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaYearStart">
                <?php
                                   foreach($nam as $item){
                                     if($item == $VisaYearStart)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
   
    <tr>
        <td class="row10" align="left">
            Visa Date End
        </td>
        <td class="row12" align="left">
            <select name="txtVisaDayEnd">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $VisaDayEnd)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaMonthEnd">
                <?php
                                   foreach($thang as $item){
                                     if($item == $VisaMonthEnd)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaYearEnd">
                <?php
                                   foreach($nam as $item){
                                     if($item == $VisaYearEnd)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
     <tr>
        <td class="row10" align="left">
            Visa Date Update
        </td>
        <td class="row12" align="left">
            <select name="txtVisaDayUpdate">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $VisaDayUpdate)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaMonthUpdate">
                <?php
                                   foreach($thang as $item){
                                     if($item == $VisaMonthUpdate)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtVisaYearUpdate">
                <?php
                                   foreach($nam as $item){
                                     if($item == $VisaYearUpdate)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="row1" align="right" ><input type="submit" name="insert" id="submit" value="Save"></td>
        <td class="row1" align="left" ><input type="reset" name="Reset" id="submit" value="Reset"></td>
    </tr>
    <tr>
        <td class="row1" align="center" colspan="2">
            <?php $titleback = '<img src ="'.base_url().'templates/images/icons/back.jpg" width=40 height=25 title="Back"/>';
            $back = anchor("staff/listForeigners",$titleback);
            echo $back;?>
        </td>
    </tr>
</table>
</form>

